﻿using M.Core.RmoteCall.ApiCall;
using System;
using System.Collections.Generic;
using System.Text;

namespace M.Core.RmoteCall
{
    public class RemoteCallHandlerFactry
    {
        static ICallHandler httpApiCallHandler = new HttpApiCallHandler();

        static ICallHandler rpcCallHandler = new ThriftRpcCallHandler();

        internal static ICallHandler CreateCallHandler(string callType)
        {
            switch (callType)
            {
                default:
                case "HttpApi":
                    return httpApiCallHandler;
                case "Rpc":
                    return rpcCallHandler;
            }
        }
    }
}
